Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to display a warning message when submitted code contains the word "stream", alerting users to properly synchronize streams. The implementation extends the report generation system with an optional extra_text parameter and integrates the stream detection logic into the submission handling flow.
Key Changes:
- Added an
extra_textparameter togenerate_report()function to allow prepending custom messages to reports - Implemented stream detection logic in
handle_submission()that checks submitted code for the word "stream" (case-insensitive) and generates an appropriate warning message - Reformatted function signatures for better readability
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/libkernelbot/report.py |
Added extra_text parameter to generate_report() function to support prepending custom warning messages; includes minor formatting improvements (blank lines and line splits) |
src/libkernelbot/backend.py |
Implemented stream detection logic that generates a warning message when code contains "stream"; integrated with the report generation by passing the warning as extra_text; reformatted submit_full() function signature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/libkernelbot/backend.py
Outdated
| stream_msg = ( | ||
| """ | ||
| > **Your code contains word 'stream'**. If you are human and use non-default stream, please make sure that you properly synchronize the stream. | ||
| > If you do not, your submission will, be deleted and not eligible for prices. |
There was a problem hiding this comment.
Spelling error: "prices" should be "prizes". The warning message refers to competition prizes, not prices.
| > If you do not, your submission will, be deleted and not eligible for prices. | |
| > If you do not, your submission will, be deleted and not eligible for prizes. |
src/libkernelbot/backend.py
Outdated
| stream_msg = ( | ||
| """ | ||
| > **Your code contains word 'stream'**. If you are human and use non-default stream, please make sure that you properly synchronize the stream. | ||
| > If you do not, your submission will, be deleted and not eligible for prices. |
There was a problem hiding this comment.
Grammar error: There is an extra comma after "will". The text should read "your submission will be deleted" instead of "your submission will, be deleted".
| > If you do not, your submission will, be deleted and not eligible for prices. | |
| > If you do not, your submission will be deleted and not eligible for prices. |
No description provided.